Skip to content

wlr/workspace: port to ext-workspace-v1 for labwc support #4016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jp7677
Copy link

@jp7677 jp7677 commented Mar 30, 2025

This PR allows to use wlr/workspaces with labwc >= 0.8.3. This is more or less a follow up to #3481 and based on labwc/labwc#2365
The heavy lifting is done in this PR, it works with labwc, but it doesn't take protocol differences between the two version into account. The last commit is a hack because workspace creation is too late and doesn't get the initial state (same reason why not the name, but the workspace id appears).
I wasn't sure if the wayland-protocols dependency should be raised to >=1.39.

Obligatory screenshot:

Screenshot

Closes #3967

@jp7677 jp7677 changed the title wlr/workspace: port to ext-workspace-v1 wlr/workspace: port to ext-workspace-v1 for labwc support Mar 30, 2025
@jp7677 jp7677 marked this pull request as draft March 31, 2025 18:43
@jp7677
Copy link
Author

jp7677 commented Apr 4, 2025

I reworked the code to move the workspace creation to the manager to be in line with the protocol. As a result the initial state hack is gone and state/name are properly picked up from labwc. I haven't tested with a multi monitor setup, but the current version works nicely for me i.c.w. labwc. That said, I have a hard time figuring out how features like persistent-workspaces or all-ouputs are supposed to work (both functionality and code-wise). Both are very likely broken with this PR. I'm also not sure if those features still makes sense with the protocol update. May be those features should be dropped? Or may be it makes more sense to start fresh, eventually as a new module?
Leaving this for now for some feedback about the general direction.

@jp7677 jp7677 force-pushed the ext-workspaces branch 11 times, most recently from fb6189a to d7fdf39 Compare April 10, 2025 15:37
@jp7677
Copy link
Author

jp7677 commented Apr 10, 2025

May be those features should be dropped? Or may be it makes more sense to start fresh, eventually as a new module?

The last commit re-implements the module from scratch. I'm quite happy with the result. All config options should still work with the exception of "persistent-workspaces". I did not took this over because of above mentioned reasons.

From my perspective this is ready for testing and of course still ready for general feedback on the direction and how this should fit in.

TODO:

  • Do not bump the required wayland-protocol version, but build the workspaces module conditionally based on the detected version
  • Tweak documentation
  • Squash commits
  • Testing (limited, from developers perspective)

@jp7677 jp7677 force-pushed the ext-workspaces branch 3 times, most recently from 732f9c7 to d508b6d Compare April 11, 2025 06:01
@jp7677 jp7677 marked this pull request as ready for review April 11, 2025 06:02
@jp7677
Copy link
Author

jp7677 commented Apr 11, 2025

I'm happy with how this PR turned out and all things that needs to be done in my opinion are done. Ready for review!

The main question still remains though: should this be a new module (since the protocol is no longer wlr specific) or, what this PR is, an in-place port.

Rework implementation to match new protocol behavior.
@Alanon202
Copy link

Any info on whether this will be merged?

I compiled waybar with the workspace patch and it works great with labwc, at least for my simple usecase of a desktop with a single monitor and a laptop, both with virtual desktops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix wlr/workspaces to support labwc
2 participants